<route lang="json5" type="page">
{
  layout: 'tabbar',
  style: {
    navigationBarTitleText: '个人中心',
  },
}
</route>

<script setup lang="ts">
import { useUserStore } from '@/store/user'

const userStore = useUserStore()

function handleLogout() {
  userStore.logout()
  uni.reLaunch({
    url: '/pages/user/index',
  })
}
</script>

<template>
  <view>
    <view class="p-4 text-center text-lg">
      物业个人中心
    </view>
    <button class="mt-8" @click="handleLogout">
      退出登录
    </button>
  </view>
</template>
